using Caliburn.Core.Metadata;
using Caliburn.PresentationFramework.ApplicationModel;
using Cirrostrata.CycleList.CaliburnTest.Infrastructure;
using Cirrostrata.CycleList.CaliburnTest.Model;

namespace Cirrostrata.CycleList.CaliburnTest.Presenters
{
    [PerRequest(typeof(ISimplePresenter))]
    public class SimplePresenter : Presenter, ISimplePresenter
    {
        private readonly IShellPresenter _shellPresenter;

        private EquipmentStatus _currentStatus;

        public EquipmentStatus CurrentStatus
        {
            get { return _currentStatus; }
            set
            {
                _currentStatus = value; 
                NotifyOfPropertyChange("CurrentStatus");
            }
        }

        public SimplePresenter(IShellPresenter shellPresenter)
        {
            _shellPresenter = shellPresenter;
        }

        public void SwitchToComplex()
        {
            _shellPresenter.Open<IComplexPresenter>();
        }
    }
}